
<template>
  <div class="cloudDiagnosis">
    <div class="container">
      <el-tabs v-model="query.status" @tab-click="handleClick" v-if="rbacAuth.getlist">
        <el-tab-pane label="书写报告" name="0"></el-tab-pane>
        <el-tab-pane label="已报告" name="1"></el-tab-pane>
      </el-tabs>
      <div class="handle-box" v-if="rbacAuth.getlist">

                <span style="padding:8px;color#242424;">姓名</span>
                <el-input v-model="query.uname" placeholder="请输入姓名" style="width:10%"></el-input>
                  <span style="padding:8px;color#242424;">患者号</span>
                <el-input v-model="query.checkno" placeholder="请输入患者号" style="width:10%"></el-input>
                <!-- <span style="padding:8px;color#242424;" v-if="role==1 || role==4">企业名称：</span>
                <el-input v-model="query.compname" placeholder="请输入企业名称" style="width:10%" @keydown="handleSearch" v-if="role==1 || role==4"></el-input> -->
                <!-- <span style="padding:8px;color#242424;">类型选择：</span>
                <el-radio-group v-model="query.type_px">
                    <el-radio :label="0">全部</el-radio>
                    <el-radio :label="1">初训</el-radio>
                    <el-radio :label="2">复训</el-radio>
                </el-radio-group> -->
                <span style="padding:8px;color#242424;">开始日期:</span>
                <el-date-picker type="date" v-model="query.timepx_st" value-format="yyyy-MM-dd" placeholder="开始日期"></el-date-picker>
                <span style="padding:8px;color#242424;">结束日期:</span>
                <el-date-picker type="date" v-model="query.timepx_ed" value-format="yyyy-MM-dd" placeholder="日期"></el-date-picker>
                <span style="padding:8px;color#242424;margin-left:10px;">数据来源:</span>
                                <el-select v-model="query.source" placeholder="请选择">
                                    <el-option
                                    v-for="item in sourceoption"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value">
                                    </el-option>
                                </el-select>



        <!-- <span style="padding: 8px 8px 8px 0">名称：</span>
        <el-input v-model.trim="query.keyword" placeholder="名称" class="handle-input mr10"
          @keydown="initAjaxMethod"></el-input> -->
        <span style="padding: 8px"></span>
        <el-button type="success" size="medium" icon="el-icon-search" @click="handleSearch()">搜索</el-button>
        <!-- <el-button type="warning" size="medium" icon="el-icon-refresh-left" @click="resultClick()">重置</el-button> -->
      </div>



      <div class="handle-box" style="display: flex">
        <el-button type="primary" icon="el-icon-document-add" size="medium" @click="createMethod"
          v-if="rbacAuth.add">新增</el-button>
        <el-button type="danger" size="medium" icon="el-icon-delete" @click="delAllSelection"
          v-if="rbacAuth.del">批量删除</el-button>
      </div>
      <el-table :data="tableData" border ref="multipleTable" header-cell-class-name="table-header"
        @selection-change="handleSelectionChange">
        <el-table-column type="selection" width="55" align="center"></el-table-column>
        <el-table-column label="序号" width="55">
          <template slot-scope="scope">{{
            scope.$index + (query.pageIndex - 1) * query.pageSize + 1
          }}</template>
        </el-table-column>

        <el-table-column label="状态" align="center" prop="statustext"></el-table-column>
        <el-table-column label="检查号" align="center" prop="checkno"></el-table-column>
        <el-table-column label="姓名" align="center" prop="name"></el-table-column>
        <!-- <el-table-column label="手机" align="center" prop="mobile"></el-table-column> -->
        <el-table-column label="性别"  align="center" prop="sextext" width="100" ></el-table-column>
        <el-table-column label="年龄"  align="center" prop="age" width="100" ></el-table-column>
        <el-table-column label="检查类型"  align="center" prop="modality" width="100" ></el-table-column>
        <el-table-column label="检查部位"  align="center" prop="inspectionarea" width="100" ></el-table-column>
        <el-table-column label="数据来源"  align="center" prop="source" width="100" ></el-table-column>
        <el-table-column label="医院"  align="center" prop="hospital" width="100" ></el-table-column>
         <el-table-column label="影像数量" align="center" prop="dicomnum"></el-table-column>
         <el-table-column label="胶片数量" align="center" prop="filmnum"></el-table-column>
         <el-table-column label="报告数量" align="center" prop="reportnum"></el-table-column>
         <el-table-column label="检查日期" align="center" prop="checkDate"></el-table-column>
         <el-table-column label="采集/上传时间" :formatter="this.$DATEFORMAT.formatDate" align="center"
          prop="create_time"></el-table-column>

        <!-- <el-table-column label="申请科室" align="center" prop="applyDepartmentName"></el-table-column> -->
        <el-table-column label="报告医生" align="center" prop="reportDoctorname"></el-table-column>
        <el-table-column label="申请时间" align="center" prop="applytime"></el-table-column>

          <!-- <template slot-scope="scope">
            <el-tag v-if="scope.row.status == 1" type="success">男</el-tag>
            <el-tag v-else type="success">女</el-tag>
          </template>
        </el-table-column>
        <el-table-column prop="status" align="center" label="是否住院">
          <template slot-scope="scope">
            <span v-if="scope.row.ishospitalization == 1">是</span>
            <span v-else>否</span>
          </template>
        </el-table-column> -->
        <!-- <el-table-column label="住院号" align="center" prop="hospitalizationNo"></el-table-column>
        <el-table-column label="床位" align="center" prop="bedNo"></el-table-column>
        <el-table-column label="门诊号" align="center" prop="outpatientServiceNo"></el-table-column> -->
   
        <!-- <el-table-column prop="status" align="center" label="是否紧急">
          <template slot-scope="scope">
            <span v-if="scope.row.urgencyDegree == 1">是</span>
            <span v-else>否</span>
          </template>
        </el-table-column> -->
        <!-- <el-table-column label="送检医生" align="center" prop="sendDoctor"></el-table-column> -->
        
        <el-table-column label="操作" width="320" align="center" fixed="right">
          <template slot-scope="scope">
            <el-button v-if="rbacAuth.edit && scope.row.status<3" type="text"
              @click="handleEdit(scope.row, 1)">信息编辑</el-button>
            <span style="padding: 3px"></span>
            <!-- click="handleEdit(scope.row, 3)" -->
        
            <!-- <el-button  type="text" @click="handleEdit(scope.row, 2)">影像</el-button> -->
            <!-- <el-button  type="text" @click="handleEdit(scope.row, 10)">影像测试1</el-button> -->
            <el-button  type="text" @click="handleEdit(scope.row, 11)">影像查看</el-button>
             <span style="padding: 3px"></span>
          
               
            <!-- 自助采集那边 无状态可言 -->
            <span v-if="scope.row.reporturl_site&&scope.row.usetypehos=='ZZJ'">
              <!-- v-if="scope.row.reporturl_site&&scope.row.usetypehos=='ZZJ'" -->
                   <el-button  type="text"  @click="visiablereport(scope.row)"  >报 告
                  </el-button>
              </span>
             <span v-else>
               <el-button type="text" @click="handleEdit(scope.row, 4)" v-if="scope.row.status<3" >写报告</el-button>
               <el-button  type="text" @click="handleEdit(scope.row, 3)" v-if="scope.row.status==3">报告信息</el-button>
             </span>
              <span style="padding: 3px"></span>

                <el-button  type="text" v-if="scope.row.filmnum&&scope.row.usetypehos=='ZZJ'"  @click="visiablefilm(scope.row)"  > 胶 片
                  </el-button>
           
         <!-- <el-button type="text" @click="handleEdit(scope.row, 4)" v-if="scope.row.status==3">修改报告</el-button> -->
        
         
            <el-button  type="text"  @click="changereport(scope.row, '1')" v-if="scope.row.status==3">召回</el-button>

           <!--  <el-button  type="text"  @click="handleEdit(scope.row, 'share')" v-if="scope.row.status==3">分享</el-button>-->
          
           
            <el-button  type="text"  @click="handleEdit(scope.row, 'copy')">复制</el-button>
                <span style="padding: 8px"></span>
                 <!-- style="color: #f56c6c" -->
            <el-popconfirm v-if="rbacAuth.del" title="确定删除吗？此操作将会无法恢复数据!请谨慎操作!" @confirm="handleDelete(scope.row.id, scope.row.title)">
              <el-button type="text" slot="reference" >删除</el-button>
            </el-popconfirm>
          </template>
        </el-table-column>
      </el-table>
      <div class="pagination">
        <el-pagination layout="sizes,total, prev, pager, next, jumper" :current-page="query.pageIndex"
          :page-size="query.pageSize" :page-sizes="[10, 20, 50, 100, 150, 200]" @size-change="handleSizeChange"
          :total="pageTotal" @current-change="handlePageChange"></el-pagination>
      </div>
    </div>
    <!-- 编辑患者 -->
    <el-dialog class="cloudDiagnosisDialog" :title="dialogTitle" :visible.sync="dialog" width="70%" :close-on-click-modal="false">
      <el-steps :active="stepsActive" finish-status="success" v-if="!id">
        <el-step title="上传影像文件" style="flex-basis:100%"></el-step>
        <el-step title="填写患者信息"></el-step>
      </el-steps>
      <div v-if="stepsActive == 0" v-loading="loading">
        <el-upload :http-request="upLoadRequest" class="upload-demo" :multiple="true" :action="upLoadPath"
          :before-upload="beforeUpload" :show-file-list="false">
          <i class="el-icon-upload"></i>
          <div class="el-upload__text">点击上传</div>
          <div class="el-upload__tip" slot="tip">只能上传dcm格式文件</div>
        </el-upload>
        <div>
          <div class="files-list" v-for="(item, index) in fileList" :key="index">
            <i class="el-icon-tickets" style="color:#999;font-size:16px;"></i>
            <span style="margin-left:10px;">{{ item.name }}</span>
            <el-progress :percentage="item.percentage" style="width:120px;margin:0 4px;" :show-text="false"></el-progress>
            <span class="el-icon-circle-check" style="color:#409eff;margin-left:10px;font-size:16px;"
              v-if="item.response && item.response.code == 1"></span>
            <span class="el-icon-circle-close" style="color:red;margin-left:10px;font-size:16px;"
              v-if="item.response && item.response.code == 0"></span>
          </div>
        </div>
        <div style="padding:40px;display:flex;justify-content: center;" v-if="fileList.length > 0 && !loading">
          <el-button type="primary" @click="nextSubmit">下一步</el-button>
        </div>
      </div>
      <el-form v-if="stepsActive == 1" :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px"
        class="demo-ruleForm">
        <el-form-item label="部位数" prop="bodynum">
          <el-input v-model.trim="ruleForm.bodynum" placeholder="" @blur="funsave"></el-input>
        </el-form-item>
        <el-form-item label="检查号" prop="checkno">
          <el-input v-model.trim="ruleForm.checkno" placeholder="" @blur="funsave"></el-input>
        </el-form-item>
        <el-form-item label="患者姓名" prop="name">
          <el-input v-model.trim="ruleForm.name" placeholder="患者姓名" @blur="funsave"></el-input>
        </el-form-item>
        <el-form-item label="性别">
          <el-radio-group v-model="ruleForm.sex" prop="sex">
            <el-radio :label="item.value" v-for="(item,index) in (pageConfig?pageConfig.sex:[])" :key="index">{{item.value}}</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="电话" prop="mobile" >
          <el-input  v-model.trim="ruleForm.mobile" placeholder="" maxlength=11 @blur="funsave"></el-input>
        </el-form-item>
        <el-form-item label="是否住院">
          <el-radio-group v-model="ruleForm.ishospitalization">
            <el-radio label="否">否</el-radio>
            <el-radio label="是">是</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="住院号" prop="hospitalizationNo">
          <el-input v-model.trim="ruleForm.hospitalizationNo" placeholder="住院号" @blur="funsave"></el-input>
        </el-form-item>
        <el-form-item label="床号" prop="bedNo">
          <el-input v-model.trim="ruleForm.bedNo" placeholder="" @blur="funsave"></el-input>
        </el-form-item>
        <el-form-item label="门诊号" prop="outpatientServiceNo">
          <el-input v-model.trim="ruleForm.outpatientServiceNo" placeholder="门诊号" @blur="funsave"> </el-input>
        </el-form-item>
        <el-form-item label="体重" prop="weight">
          <el-input v-model.trim="ruleForm.weight" placeholder="体重" @blur="funsave" ></el-input>
        </el-form-item>
        <el-form-item label="身份证号" prop="idCard">
          <el-input v-model.trim="ruleForm.idCard" placeholder="身份证号" @blur="funsave"></el-input>
        </el-form-item>
        <el-form-item label="年龄" prop="age">
          <div style="display:flex;">
            <el-input type="number" v-model.trim="ruleForm.age" placeholder="年龄" min="0"></el-input>
              <el-select v-model="ruleForm.ageType" placeholder="请选择" style="width:100px;">
              <el-option v-for="(item,index) in (pageConfig?pageConfig.age:[])" :key="index"
                :label="item.name"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </div>
        </el-form-item>
        <el-form-item label="检查部位" prop="inspectionarea">
          <el-input v-model.trim="ruleForm.inspectionarea" placeholder="检查部位" @blur="funsave" ></el-input>
        </el-form-item>
        <el-form-item label="是否紧急">
          <el-radio-group v-model="ruleForm.urgencyDegree">
            <el-radio :label="0">否</el-radio>
            <el-radio :label="1">是</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="检查类型" prop="modality">
          <el-input v-model.trim="ruleForm.modality" placeholder="检查类型" @blur="funsave" ></el-input>
        </el-form-item>

        <el-form-item label="申请科室" prop="applyDepartmentName" @blur="funsave">
          <el-input v-model.trim="ruleForm.applyDepartmentName" placeholder="申请科室"></el-input>
        </el-form-item>
        <!-- <el-form-item label="送检医生" prop="sendDoctor">
          <el-input v-model.trim="ruleForm.sendDoctor" placeholder="送检医生"></el-input>
        </el-form-item> -->
       <el-form-item label="申请医生" prop="applyDoctorName">
          <el-input v-model.trim="ruleForm.applyDoctorName" placeholder="申请医生" @blur="funsave"></el-input>
        </el-form-item>
        
        <!-- <el-form-item label="检查描述">
          <el-input type="textarea" v-model.trim="ruleForm.healthCheck" placeholder="检查描述" :rows="5" maxlength="500"
            show-word-limit></el-input>
        </el-form-item> -->
        <el-form-item label="临床诊断">
          <el-input type="textarea" @blur="funsave" v-model.trim="ruleForm.clinicalDiagnosis" placeholder="临床诊断" :rows="5" maxlength="500"
            show-word-limit></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer" v-if="stepsActive == 1">
        <el-button @click="canceldialog">取 消</el-button>
        <el-button type="primary" @click="submitMethod">保存</el-button>
      </span>
    </el-dialog>



   <!--  分享 -->
    <el-dialog  title="分享" :visible.sync="dialogshare" width="40%" :close-on-click-modal="false">
      <el-form  ref="ruleFormshare" label-width="100px"
        class="demo-ruleForm">
        <!-- <el-form-item label="接收人电话">
          <div style="display: flex;align-items: center;justify-content: space-between;">
              <el-input style="width:50%;" v-model.trim="shareObj.mobile" placeholder="请输入"></el-input>
              <el-button type="primary" @click="shareMethod(1)">发送短信</el-button>
          </div>
        </el-form-item> -->
        <!-- <el-form-item label="分享链接">
          <div style="display: flex;align-items: center;justify-content: space-between;">
              <el-input style="width:50%;" disabled v-model="shareObj.shareurl"></el-input>
              <el-button type="primary" @click="shareMethod(2)">复制</el-button>
          </div>
        </el-form-item> -->
        <el-form-item label="报告二维码">
          <img style="width:200px;height:200px;" :src="shareObj.ewmurl" alt="">
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer" style="align='center'" >
        <el-button @click="shareMethod(3)">下载二维码</el-button>
        <el-button type="primary" @click="shareMethod(4)">打印</el-button>
      </span>
    </el-dialog>
   <!-- 复制 -->
   <el-dialog  title="复制" :visible.sync="dialogcopy" width="40%" :close-on-click-modal="false">
      <el-form  ref="ruleFormcopy" label-width="100px"
        class="demo-ruleForm">

        <el-form-item label="参考部位">
          <div style="display: flex;align-items: center;justify-content: space-between;">
              <el-input style="width:50%;" disabled v-model="copyObj.inspectionarea"></el-input>
              <!-- <el-button type="primary" @click="shareMethod(2)">复制</el-button> -->
          </div>
        </el-form-item>

        <el-form-item label="添加部位">
          <div style="display: flex;align-items: center;justify-content: space-between;">
              <el-input style="width:50%;" v-model.trim="copyObj.inspectionareanew" placeholder="请输入"></el-input>
              <!-- <el-button type="primary" @click="shareMethod(1)">发送短信</el-button> -->
          </div>
        </el-form-item>
        
        <!-- <el-form-item label="二维码">
          <img style="width:200px;height:200px;" :src="shareObj.ewmurl" alt="">
        </el-form-item> -->
      </el-form>
      <span slot="footer" class="dialog-footer" style="align='center'" > 

        <el-button @click="copysubmitMethod">保存</el-button>
        <!-- <el-button type="primary" @click="shareMethod(4)">打印</el-button> -->
      </span>
    </el-dialog>

 

    <report-write :title="effectTtile" :id="effectId" :show.sync="effectShow" :report-write-event="reportWriteEvent()"></report-write> 
    <el-dialog title="报告" :visible.sync="dialogBg" width="80%" top="2%">
      <iframe v-if="dialogBg" :src="pdfUrl" frameborder="0" style="width:100%;height:80vh"></iframe>
    </el-dialog>


 
    <!-- <el-dialog
    v-model="showDialogdcmup"
    width="500"
    confimText="确认"
    cancelType="primary"
    :confimBtnLoading="confimBtnLoading"
    @confim="confirmModel"
    @change="changeModel"
    title="dialog弹框"
  >
    <div>中间内容</div>
  </el-dialog> -->

  <!-- <template>
  <div class="modal" v-if="showDialogdcmup">
    <div class="modal-content">
      <span class="close" @click="confirmModel">&times;</span>
      <p>这里是弹窗内容神鼎飞丹砂发dsf</p>
    </div>
  </div>
</template> -->


<template>
  <div v-if="showDialogdcmup" class="popup">
    <!-- 弹窗的内容 -->
    <div class="popup-content">
      后台通讯有误,请检查网络状况！
    </div>
    <!-- 关闭按钮 -->
    <button class="close-button" @click="confirmModel">确认</button>
  </div>
</template>
 
  <el-image-viewer
            v-if="visiableImg"
            :on-close="()=>{ visiableImg = false }"
            :url-list="srcList"
        />

  </div>
</template>

 

<script>
import ElImageViewer from 'element-ui/packages/image/src/image-viewer';
import {Toast} from 'vant';
import reportWrite from "./reportWrite";
import { mapState } from 'vuex';
import _ from 'lodash';
import axios from "axios";
import bus from '@/common/bus';
export default {
  components: { reportWrite,ElImageViewer},
  name: "cloudDiagnosisss", 
  computed: {
    ...mapState({
      rbacAuth: state =>state.app.rcba
    })
  },
  watch: {
    $route(){
      console.log("清除定时器")
        clearInterval(this.timer);
        this.timer=null;
        this.showDialogdcmup=false;
    }
},
  data() {
    return {
      showDialogdcmup:false, 
      confimBtnLoading: false,
      visiableImg:false,             
      srcList: [],
      upLoadPath: this.$API.CLOUDDIAGNOSIS_TODICOM,
      treeData: [],
      fileList: [],
      isread: 0,
      stepsActive: 0,
      dialog: false,
      dialogBg: false,
      disabled: false,
      dialogsharetitle: '',
      dialogshare: false,
      dialogcopytitle: '',
      dialogcopy: false,
      loading: false,
      effectShow: false,
      effectId: "",
      pdfUrl: '',
      effectTtile: "",
      query: {
        uname: '',
                checkno: '',
                pxjgid: '',
                compname: '',
                pageIndex: 1,
                pageSize: 20,
                type_px: 0,
                is_del: '',
                source:'',
                listType: 2,
                timepx_st:'',
                timepx_ed:'',   
        status:'0'
      },      
     sourceoption:[{label:'自动采集',value:1},{label:'手动上传',value:0}],
      shareObj:{
        mobile:'',
        // shareurl:'https://lanyingsup.zrs360.vip/public/uploads/ewm/SF20230711162835885.png',
        // ewmurl:'https://lanyingsup.zrs360.vip/public/uploads/ewm/SF20230711162835885.png'
        shareurl:'',
        ewmurl:''

      },
      copyObj:{
        inspectionarea:'',
        inspectionareanew:''

      },
      tableData: [],
      pageTotal: 0,
      multipleSelection: [],
      ruleForm: {
        bodynum: "",
        checkno: "",
        name: "",
        sex: 1,
        mobile: "",
        ishospitalization: '否',
        hospitalizationNo: '',
        bedNo: '',
        outpatientServiceNo: '',
        inspectionarea: '',
        weight: '',
        idCard: '',
        age: '',
        urgencyDegree: 0,
        checkTypeName: '',
        healthCheck: '',
        applyDepartmentName: '',
        sendDoctor: '',
        clinicalDiagnosis: '',
        spuidarr: '',
        healthCheck:'',
        checkDate:'',
        ageType:''
      },
      rules: {
         
        name: [{ required: true, message: "请输入名称"}],
        sex: [{ required: false, message: "请选择性别", trigger: "change" }],
        mobile: [{ required: false, message: "请输入电话"},
                 { pattern: /^[1][3,4,5,7,8,9][0-9]{9}$/, message: '请输入正确的11位手机号!'}
                ],
        hospitalizationNo: [{ required: false, message: "请输入住院号", trigger: "change" }],
        bedNo: [{ required: false, message: "请输入床位", trigger: "change" }],
        outpatientServiceNo: [{ required: false, message: "请输入门诊号", trigger: "change" }],
        inspectionarea: [{ required: false, message: "请输入检查部位", trigger: "change" }],
        weight: [{ required: false, message: "请输入体重", trigger: "change" }],
        idCard: [{ required: false, message: "请输入身份证号", trigger: "change" },
                 { pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/, message: '请输入正确的身份证号', trigger: 'change' }
                ],
        age: [{ required: false, message: "请输入年龄", trigger: "change" },
        { pattern: /^(?:[1-9][0-9]?|1[01][0-9]|150)$/, message: '请输入0-150范围内的年龄数值!', trigger: 'change' }  
      ],
        modality: [{ required: false, message: "请输入检查类型", trigger: "change" }],
        applyDepartmentName: [{ required: false, message: "请输入申请科室", trigger: "change" }],
        sendDoctor: [{ required: false, message: "请输入送检医生", trigger: "change" }],
        applyDoctorName: [{ required: false, message: "请输入申请医生", trigger: "change" }],
        clinicalDiagnosis: [{ required: false, message: "请输入.临床诊断", trigger: "change" }],
      },
      ruleValidate: {
                // mobile: [
                //     { required: false, message: '请输入联系电话', trigger: 'change' },
                //     { pattern: /^[1][3,4,5,7,8,9][0-9]{9}$/, message: '请输入正确的11位手机号!', trigger: 'change' }
                // ],
                // idCard: [
                //     { required: false, message: '请输入身份证号码', trigger: 'blur' },
                //     { pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/, message: '请输入正确的身份证号', trigger: 'blur' }
                // ]
                
            },

      dialogTitle: "新增",
      id: null,
      pageConfig:null,
      userInfo1:'',
      detail:'',
      timer:'',
      isfirstshowNotice1:0,
      screenResolutionx:0,
      screenResolutiony:0,
    
    };
  },
 

  created() {
    // console.log('rbacAuth',this.rbacAuth);
    this.initAjaxMethod(); 
    this.baseAjaxMethod();
    this.logusername();
  //  this.checknetworkisping();;
    // this.showDialogdcmup=true;

    // bus.$on("collapse", (msg) => {
    //   this.collapse = msg;
    //   bus.$emit("collapse-content", msg);
    // }); 
    // this.$store.commit("setShowlogin", true);
    // this.$store.dispatch('app/setShowlogin', true);
    // bus.$emit("showlogin", true);

    // this.showtanchuang();
    this.getAllZoom();
    
  },

  methods: {

    // 获取缩放倍数（1*系统缩放倍数*浏览器缩放倍数）
    getZoom() {
      let zoom = 1;
      const screen = window.screen,
        ua = navigator.userAgent.toLowerCase();

      if (window.devicePixelRatio !== undefined) {
        zoom = window.devicePixelRatio;
      } else if (~ua.indexOf('msie')) {
        if (screen.deviceXDPI && screen.logicalXDPI) {
          zoom = screen.deviceXDPI / screen.logicalXDPI;
        }
      } else if (window.outerWidth !== undefined && window.innerWidth !== undefined) {
        zoom = window.outerWidth / window.innerWidth;
      }
      return this.getDecimal(zoom);
    },
    getDecimal(num){
      return Math.round(num * 100) / 100;
    },
    getAllZoom() {
          // 总缩放倍数
          const zoom = this.getZoom();
          // 屏幕分辨率
          const screenResolutionx = window.screen.width;
          const screenResolutiony = window.screen.height;
          // 获取浏览器内部宽度
          const browserWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
          // 浏览器缩放倍数
          // 浏览器外部宽度不受浏览器缩放影响，浏览器内部宽度受影响,所以根据这个可以计算出浏览器缩放倍数（F12调试工具的占位会影响该值）
          const browserZoom = this.getDecimal(window.outerWidth / browserWidth);
          // 系统缩放倍数
          const systemZoom = this.getDecimal(zoom / browserZoom);
          // 系统分辨率
          const systemResolution = Math.round(screenResolutionx * systemZoom);

          this.screenResolutionx=screenResolutionx;
          this.screenResolutiony=screenResolutiony; 
          console.log('系统分辨率', systemResolution, '屏幕分辨率', screenResolutionx+'x'+screenResolutiony, '浏览器外部宽度', window.outerWidth, '浏览器内部宽度', browserWidth, '总缩放倍数', zoom, '浏览器缩放倍数', browserZoom, '系统缩放倍数', systemZoom);

          // return {
          //   zoom,
          //   browserZoom,
          //   systemZoom,
          //   systemResolution
          // }
    }, 
    logusername () {
      let userInfo = localStorage.getItem('userInfo');
      let userInfo1= userInfo ? JSON.parse(userInfo) : {realname:this.name};
      this.ruleForm.sendDoctor=userInfo1.realname;
      // console.log(userInfo1);
    },
    //  大的弹窗提示信息
    showtanchuang(){
      this.$confirm('确定要退出删除此项目？', '提示', {
        confirmButtonText: '确定',
         cancelButtonText: '取消',
          type: 'warning',
         }).then(async () => {
//         const { code } = await $Fetch.resourceDelete(this.categoryId, ids);
//         if (code == 1) {
//           this.$message.success('操作成功');
//           this.treeOpenBack(this.categoryId, this.curentItemDetail, 2);
//         }
      });
    },

    showiscanViewscreenNotice(){
      this.$confirm('请确认终端是否符合医学影像显示要求的提示', '提示', {
        confirmButtonText: '确定',
         cancelButtonText: '取消',
          type: 'warning',
         }).then(async () => {
//         const { code } = await $Fetch.resourceDelete(this.categoryId, ids);
//         if (code == 1) {
//           this.$message.success('操作成功');
//           this.treeOpenBack(this.categoryId, this.curentItemDetail, 2);
//         }
      });
    },

    shareMethod(flag){
      if(flag == 1){
        if(!(/^1[123456789]\d{9}$/.test(this.shareObj.mobile))){ 
            return this.$message.error('手机号码格式有误');
        } 

        // 发送代码
      }else if(flag == 2){
        this.$copyText(this.shareObj.shareurl).then(
	      e=>{
          this.$message.success('复制成功');
	      },
	      e=>{
          this.$message.error('复制失败');
	      }
      )
      }else if(flag == 3){
        // post 不行 下载图片
        // this.$http.downMetodget(this.shareObj.ewmurl,'二维码_'+Date.now())
        
        let fileName='二维码_'+Date.now()+".png";  
        const imgUrl =this.shareObj.ewmurl; 
        this.$http.downloadImage01(fileName,imgUrl)

      }else if(flag == 4){
        this.printNewWindow(this.shareObj.ewmurl);
      }
    },
     
    printNewWindow(imgSrc) {
        let oWin = window.open('', 'pringwindow', 'menubar=no,location=no,resizable=yes,scrollbars=no,status=no,width=1000,height=660')
        oWin.document.fn = function() {
            if (oWin) {
                oWin.print()
                oWin.close()
            }
        }
        let html = '<div style="height: 100%;width: 100%;">' + `<img src="${imgSrc}" onload="fn()" style="max-height:100%;max-width: 100%;" />` + '</div>'
        oWin.document.open()
        oWin.document.write(html)
        oWin.document.close()
    },
    handleSource(data) {
      this.$router.push({
        path: "/resourceEdit",
        query: { id: data.id, type: 2 },
      });
    },
    //重置
    resultClick() {
      this.query.pageIndex=1;
      this.query.keyword='';
      this.initAjaxMethod();
    },
    funsave(){
      // 浏览器缓存 
      let forminfo=sessionStorage.setItem('uform',JSON.stringify(this.ruleForm));
      //let uinfostr=localStorage.getItem('uform');
      let forminfostr=sessionStorage.getItem('uform');
      if(forminfostr){
        // let forminfo=JSON.parse(forminfostr);
        // let data=JSON.parse(forminfostr);
        // console.log(forminfo) 

      }else{
        // let forminfo=sessionStorage.setItem('uform',JSON.stringify(this.ruleForm));
      }
    //   localStorage.setItem('uform', JSON.stringify(this.ruleForm) );
    //  let uinfo=localStorage.getItem('uform'); 
      // console.log(uinfo.checkno);
    },
    successMethod() {
      this.dialog = false;
      this.$set(this.query, "pageIndex", 1);
      this.initAjaxMethod();
    },
    // 触发搜索按钮
    handleSearch() {
      this.$set(this.query, "pageIndex", 1);
      this.initAjaxMethod();
    },
    handleClick(){
      // console.log("qiehuan",this.query.status);
      this.query.pageIndex=1;
      this.query.keyword='';
      this.initAjaxMethod();
    },
    // 分页导航
    handlePageChange(val) {
      this.$set(this.query, "pageIndex", val);
      this.initAjaxMethod();
    },
    handleSizeChange(e) {
      this.query.pageSize = e;
      this.initAjaxMethod();
    },
    // 删除操作
    handleDelete(id, detail) {
      this.delAjaxMethod(id, detail);
    },
    // 多选操作
    handleSelectionChange(val) {
      this.multipleSelection = val;
    },
    delAllSelection() {
      if (this.multipleSelection.length <= 0) {
        return this.$message.error("请选择一个目录");
      }
      this.$confirm("确定要删除吗？", "提示", {
        type: "warning",
      })
        .then(() => {
          let ids = this.multipleSelection.map((item) => item.id);
          this.delAjaxMethod(ids.join(","));
        })
        .catch(() => { });
    },
    createMethod() {
      // 监测网络状态
    
      clearInterval(this.timer)
      this.timer=setInterval(() => {
         this.checknetworkisping();
      },5000)

      let userInfo = localStorage.getItem('userInfo');
      let userInfo1= userInfo ? JSON.parse(userInfo) : {realname:this.name};
      // this.ruleForm.sendDoctor=userInfo1.realname;

      this.fileList = [];
      this.stepsActive = 0;
      this.ruleForm = {
        bodynum: "",
        checkno: "",
        name: "",
        sex: '',
        mobile: "",
        ishospitalization: '否',
        hospitalizationNo: '',
        bedNo: '',
        outpatientServiceNo: '',
        inspectionarea: '',
        weight: '',
        idCard: '',
        age: '',
        urgencyDegree: 0,
        checkTypeName: '',
        healthCheck: '',
        applyDepartmentName:  userInfo1.departname,
        sendDoctor: userInfo1.realname,
        clinicalDiagnosis: '',
        checkDate: '',
        ageType:'岁'
      }
      this.isread = 0;
      this.dialog = true;
      this.id = null;
      this.dialogTitle = "新增";
      this.$nextTick(() => {
        document.getElementsByClassName(
          "el-upload__input"
        )[0].webkitdirectory = true;
        if (this.$refs["ruleForm"]) {
          this.$refs["ruleForm"].clearValidate();
        }
      });
    },
    // 编辑操作
    async handleEdit(data, flag) {
      if (flag == 1) {
        this.id = data.id;
        this.stepsActive = 1;      

        let forminfostr=sessionStorage.getItem('uform');       
        if(forminfostr){
          let forminfo=JSON.parse(forminfostr);
          data=JSON.parse(forminfostr);
     
          console.log("huancun",forminfo)
          
        }else{

        }
     
        console.log("xx",data);
        this.ruleForm = {
          bodynum: data.bodynum,
          checkno: data.checkno,
          name: data.name,
          sex: data.sex,
          mobile: data.mobile,
          ishospitalization: data.ishospitalization,
          hospitalizationNo: data.hospitalizationNo,
          bedNo: data.bedNo,
          outpatientServiceNo: data.outpatientServiceNo,
          inspectionarea: data.inspectionarea,
          weight: data.weight,
          idCard: data.idCard,
          age: data.age,
          urgencyDegree: data.urgencyDegree,
          checkTypeName: data.checkTypeName,
          healthCheck: data.healthCheck,
          applyDepartmentName: data.applyDepartmentName,
          applyDoctorName: data.applyDoctorName,
          sendDoctor: data.sendDoctor,
          modality: data.modality,
          clinicalDiagnosis: data.clinicalDiagnosis,
          ageType:data.ageType || '岁'
        }
        this.dialog = true;
   
        this.dialogTitle = "编辑";
        this.$nextTick(() => {
          if (this.$refs["ruleForm"]) {
            this.$refs["ruleForm"].clearValidate();
          }
        });
      } else if (flag == 2) {
        var url = this.$API.DOMAIN_NAME+'/public/toDicom1.html?type=yzd&token=adfsfeef&zid=' + data.id+'&checknom='+data.checkno_m;
        window.open(url, '_blank', 'menubar=no,toolbar=no, status=no,scrollbars=yes');
      } else if (flag == 3) {
        console.log("222",data.id);
        let url=this.$API.DOMAIN_NAME+this.$API.CLOUDDIAGNOSIS_VIEWREPORT+"?id="+data.id+"&.pdf&checkdate="+data.checkDate+"&checkdate="+data.checkDate;
        this.pdfUrl= `${this.$API.DOMAIN_NAME}/web/pdf/web/viewer.html?file=${encodeURIComponent(url)}`;
        this.dialogBg=true;
      } else if (flag == 4) {
        // this.$router.push({path:'/reportWrite',query:{id:data.id}})
        this.effectTtile=data.name;
        this.effectId=data.id;
        this.effectDerail=data;
        this.effectShow=true;
      }else if (flag == 'share') {

 
        this.detailMethod(data);
        console.log("xx",data);

        // this.ruleFormshare = {
        //   shareurl: data.shareurl,
        //   ewmurl:data.shareewmurl,
           
        // }
        // this.shareObj = {
        //   shareurl: data.shareurl,
        //   ewmurl:data.shareewmurl,
           
        // }    
        // this.dialogshare = true;
        // this.id = data.id;
        // this.dialogsharetitle = "分享";
   
      } else if (flag == 10) {
        // pacsviewendtime  cseriesid_pacs
      
     
      } else if (flag == 11) {


        // 联氪测试         
       if(data.studyuid=="" || data.studyuid=="null" ){
               this.$message.error("缺少SUID");return false;
        } 

        // let isfirstshowNotice11=sessionStorage.setItem('uform',JSON.stringify(this.ruleForm));
        let isfirstshowNotice11=sessionStorage.getItem('isfirstshowNotice');
 
 
                        var targetApp="viewer";
                        var vc = "link"; //vendor code
                        // var hostAddr = "view.blue-imaging.com"; // 蓝影
                        var hostAddr =this.$API.DCM_viewurl;
                        //  var hostAddr = "pacs.link-imaging.com";//window.location.host;
                         //Url过期时间（单位为秒）
                        var expires = data.expires;                 
                        var signature =data.signature;          
                        var serverAddr =data.serverAddr;
                        var linkviewurl = "https://" + hostAddr + "/Viewer/Index"
                        linkviewurl = linkviewurl + "?ds=rest" + "&serverAddr=" + serverAddr + "&vc=" + vc +
                        "&expires=" + expires + "&signature=" + signature + "&targetApp=" + targetApp;
                        //  window.open(linkviewurl, "Viewer");//打开连接

// _blank   newwindow
                var height = screen.availHeight;
                var width = screen.availWidth;
                // this.screenResolutionx=screenResolutionx;
                // this.screenResolutiony=screenResolutiony; 
                console.log("123",this.screenResolutionx);
                // isfirstshowNotice11=="" || isfirstshowNotice11==null
                // 1920 1080 
                // c）最低分辨率： 1280 * 768 或兼容版本
                if(this.screenResolutionx<1280 || this.screenResolutiony<768){
                  // 影像预览最低分辨率为：1280*768，您当前的分辨率为：.....，影像预览可能会不清晰，请确认是否继续？
                  let screentext=this.screenResolutionx + "x" + this.screenResolutiony;
                  this.$confirm('影像预览最低分辨率为：1280*768，您当前的分辨率为：'+screentext+',影像预览会不清晰，请确认是否继续?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                      type: 'warning',
                    }).then(async () => {
            //         const { code } = await $Fetch.resourceDelete(this.categoryId, ids);
            //         if (code == 1) {
            //           this.$message.success('操作成功');
            //           this.treeOpenBack(this.categoryId, this.curentItemDetail, 2);
            //         }                     
                       sessionStorage.setItem('isfirstshowNotice',1);
                       window.open(linkviewurl, '_blank', 'height=' + height + ', width=' + width + ', top=0, left="-8", toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no') 

                  });
                }else{

                  window.open(linkviewurl, '_blank', 'height=' + height + ', width=' + width + ', top=0, left="-8", toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no') 

                }




 

     
      } else if (flag == "copy") {
            //  inspectionAreanew:
          this.copyObj = {
              inspectionarea: data.inspectionarea,
                mobile: data.mobile,   
                // ewmurl:data.shareewmurl,
                
              }   
          this.dialogcopy = true;
          this.id = data.id;
          this.dialogcopytitle = "复制"; 
        

      }

      
    },
    reportWriteEvent(){
      return {
        imageFinding:()=>{
          this.handleEdit(this.effectDerail,2)
        },
        pdfView:()=>{
          this.handleEdit(this.effectDerail,3)
        },

      }
    },
    async getPdf(id){
      return axios.get(this.$API.CLOUDDIAGNOSIS_VIEWREPORT,{id}).then(res=>res.data)
    },
     //详情加载
     detailMethod(data1) {
      this.$http
        .post(this.$API.MOBILE_REPORT_SHAREREPORT, {
          zid: data1.id,hoscode:data1.hospitalid,checkno:data1.checkno
        })
        .then((res) => {
          console.log("媒资列表", res);
          if (res.code == 1) {

        this.ruleFormshare = {
            shareurl: res.data.shareurl,
            ewmurl:res.data.shareewmurl,
            
        }
        this.shareObj = {
          shareurl: res.data.shareurl,
          ewmurl:res.data.shareewmurl,
           
        }    
        this.dialogshare = true;
        this.id = data1.id;
        this.dialogsharetitle = "分享"; 
        // detail
            // this.tableData = Array.isArray(res.data.list) ? res.data.list : [];
            // this.pageTotal = res.data.total;
          }
        });
    },

    //列表加载
    initAjaxMethod() {
      this.$http
        .post(this.$API.CLOUDDIAGNOSIS_INDEX, {
          pageIndex: this.query.pageIndex,
          pageSize: this.query.pageSize,
          title: this.query.keyword,
          status:this.query.status,
           uname: this.query.uname,
           source: this.query.source,
           timepx_st:this.query.timepx_st,
           timepx_ed:this.query.timepx_ed,     
          checkno:this.query.checkno,
          comfrom:'lysel',       

        })
        .then((res) => {
          // console.log("媒资列表", res);
          if (res.code == 1) {
            this.tableData = Array.isArray(res.data.list) ? res.data.list : [];
            this.pageTotal = res.data.total;
          }else{
             this.$message.error(res.msg);
          }
        });
    },

     
    baseAjaxMethod(){
      this.$http.post(this.$API.GET_BASE_INFO)
        .then((res) => {
          if (res.code == 1) {
            let list = Array.isArray(res.data.list) ? res.data.list : [];
            let typeList=_.uniq(list.map(o=>o.type)),config={};
            typeList.forEach(item=>{
              config[item]=[];
              list.forEach(val=>{
                if(val.type === item){
                  config[item].push(val)
                }
              })
            })
            this.pageConfig=config;
          }
        });
    },

    submitMethod() {
      this.$refs["ruleForm"].validate((valid) => {
        if (valid) {
          this.ruleForm.status = this.ruleForm.status == false ? 1 : 0;
          const loading = this.$loading({ text: "加载中..." });
          const url = this.id
            ? this.$API.CLOUDDIAGNOSIS_EDIT
            : this.$API.CLOUDDIAGNOSIS_ADD;
          if (this.id) this.ruleForm.id = this.id;
          this.$http
            .post(url, this.ruleForm)
            .then((res) => {
              // console.log("公海列表", res);
              if (res.code == 1) {

                sessionStorage.setItem('uform','');// 清除缓存
                this.$message.success("操作成功");
                if (!this.id) this.query.pageIndex = 1;
                this.dialog = false;
                this.initAjaxMethod();
              } else {
                this.$message.error(res.msg);
              }
              loading.close();
            })
            .catch((err) => {
              loading.close();
              this.$message.error(err.msg);
            });
        } else {
          this.$message.error("请检查页面内容是否填写完整!");
        }
      });
    },
    // 复制新增
    copysubmitMethod() {
       
          // this.ruleForm.status = this.ruleForm.status == false ? 1 : 0;
          const loading = this.$loading({ text: "加载中..." });
          if(this.id==""){
              loading.close();
              this.$message.error("缺少id");
          }
      
          //       copyObj:{
         const url = this.$API.CLOUDDIAGNOSISCOPY_ADD;
          if (this.id) this.copyObj.id = this.id;

          this.$http
            .post(url, this.copyObj)
            .then((res) => {
              // console.log("公海列表", res);
              if (res.code == 1) {
                this.$message.success("操作成功");
                if (!this.id) this.query.pageIndex = 1;
                this.dialog = false;
                this.dialogcopy = false;
                this.initAjaxMethod();
              } else {
                this.$message.error(res.msg);
              }
              loading.close();
            })
            .catch((err) => {
              loading.close();
              this.$message.error(err.msg);
            });
       
        // else {
        //   this.$message.error("有必填项目未填写");
        // }
      
    },
    //删除单个
    delAjaxMethod(id) {
      const loading = this.$loading({ text: "加载中..." });
      this.$http
        .post(this.$API.CLOUDDIAGNOSIS_DEL, { ids: id })
        .then((res) => {
          loading.close();
          if (res.code == 1) {
            this.$message.success("删除成功");
            this.initAjaxMethod();
          } else {
            this.$message.error(res.msg);
          }
        })
        .catch((err) => {
          this.$message.error(err.msg);
        });
    },

      //修改报告状态
    
    changereport(item,flag) {
            console.log(111,item);
            let hoscode=item.hospitalid;
            let checkno=item.checkno;
            let checkdate=item.checkDate;
                let para={zid:item.id,status:flag,hoscode:hoscode,checkno:checkno,checkdate:checkdate};
                const loading = this.$loading({ text: '提交中' });
                this.$http.post(this.$API.MOBILE_REPORT_TREE_CHANGEst, para)
                    .then((res) => {
                        loading.close();
                        console.log('登录信息', res)
                        if (res.code == 1) {
                            Toast.success('操作成功');
                            // this.getDetail()                         
                            //  this.query.status = 0;
                            //  this.active=0;
                                // this.resultMethod()
                             this.initAjaxMethod();
                        }else{
                            Toast.fail(res.msg);
                        }
                    })
            
        },

        // 定时器 检测网络
        checknetworkisping() { 
                let para={zid:5874,token:"HYHHBVFTTTTBCFTGHH"};
                // const loading = this.$loading({ text: '提交中' });
                this.$http.post(this.$API.getnetworkisping, para)
                    .then((res) => {                       
                        console.log('登录信息', res)
                        if (res.code == 1) {
                            // Toast.success('操作成功');
                            this.showDialogdcmup=false;
                            
                        }else{
                          this.showDialogdcmup=true;                        
                          
                            // Toast.fail(res.msg);
                        }
             })
            
        },



    // 上传
    upLoadRequest(params) {
      let form = new FormData();
      form.append('file', params.file);
      form.append('spuid', params.file.uid);



      // var FileExt = params.file.name.replace(/.+\./, "");       
      // if(this.isread==0 && ['dcm'].indexOf(FileExt.toLowerCase()) != -1){
      //  form.append('isread', 1);
      //  this.isread=1;
      // }else{
      //   form.append('isread', 0);
      // }
      // new Promise.all()
      this.$http
        .post(this.$API.CLOUDDIAGNOSIS_TODICOM, form)
        .then((res) => {
          let cIndex = _.findIndex(this.fileList, o => o.uid == res.spuid)
          if (cIndex >= 0) {
            this.fileList[cIndex].response = res;
            this.fileList[cIndex].percentage = res.code == 0 ? 0 : 100;
            this.fileList[cIndex].spuid = res.spuid;
            this.$forceUpdate();
          }
          if (res.code == 0) {
            this.$message.error(res.msg);
          }
          let falg = true;
          this.fileList.forEach(item => {
            if (!item.response || (item.response && item.response.code != 1)) {
              falg = false;
            }
          })
          if (falg) {
            this.loading = false;
            this.$message.success("上传成功");
          }
        })
        .catch((err) => {
          this.$message.error(err.msg);
        });
    },
    beforeUpload(file) {

      this.loading = true;
      this.fileList.push(file)
    },
    nextSubmit() {
      let response = this.fileList[this.fileList.length - 1].response;
     
      var dcmfiles=[];
      this.fileList.forEach(item => {            
            var spuid=item.spuid; 
            dcmfiles.push(spuid);
          })
      var dcmfilesstr = dcmfiles.join(",");   
      // console.log("sdfd",dcmfilesstr);return;  
      // 反写

      if (response.data && response.data.name) {

        this.ruleForm.checkno = response.data.checkno;
        // this.ruleForm.hospitalizationNo=response.data.birth;
        // this.ruleForm.outpatientServiceNo=response.data.checkno;
        this.ruleForm.name = response.data.name;
        this.ruleForm.modality = response.data.modality;
        this.ruleForm.checkDate = response.data.checkDate;
        this.ruleForm.checkno = response.data.checkno;
        this.ruleForm.inspectionarea =  response.data.inspectionarea;  
        this.ruleForm.spuidarr = dcmfilesstr;// 文件数
        this.ruleForm.ageType = response.data.ageType;
        this.ruleForm.age = response.data.age;
        this.ruleForm.sex = response.data.sex;
        this.ruleForm.studyuid = response.data.studyuid;    

      }
      this.stepsActive = 1;
    },
       
      // 报告 
      visiablereport(data){
       // console.log("view",data);
         this.visiableImg=true;
          this.srcList[0]=data.reporturl_site;
      
     
       },
       // 胶片
   visiablefilm(data){     
         this.visiableImg=true;
          this.srcList=data.filmurl_ossarr;     
       },

        /**
     * @desc 上传弹框关闭事件
     */
    changeModel() {
      this.showDialogdcmup = false;
    },
    /**
     * @desc 确定按钮事件
     */
    confirmModel() {
      this.confimBtnLoading= true;
      // 处理业务逻辑相关的代码
      this.confimBtnLoading= false;
      this.showDialogdcmup= false;
    },
    canceldialog(){
      this.$confirm('确定要取消编辑吗？此操作将不会保存当前编辑信息！', '提示', {
        confirmButtonText: '确定',
         cancelButtonText: '取消',
          type: 'warning',
         }).then(async () => {
           this.dialog = false;
//         const { code } = await $Fetch.resourceDelete(this.categoryId, ids);
//         if (code == 1) {
//           this.$message.success('操作成功');
//           this.treeOpenBack(this.categoryId, this.curentItemDetail, 2);
//         }
      });
    },
	

  },
  destroyed(){
    // 清除定时器
     console.log("清除定时器")
        clearInterval(this.timer)
        //clearTimeout(this.timer)
  }

};
</script>

<style scoped>
.container {
  padding: 20px;
}

.handle-select {
  width: 120px;
}

.handle-input {
  width: auto;
  display: inline-block;
}

.table {
  width: 100%;
  font-size: 14px;
}

.red {
  color: #f56c6c;
}

.mr10 {
  margin-right: 10px;
}

.table-td-thumb {
  display: block;
  margin: auto;
  width: 40px;
  height: 40px;
}

.demo-drawer__content {
  margin: 0 auto;
  width: 80%;
  border: 1px solid #fafafa;

}

.sort-title {
  font-size: 14px;
  color: #333;
  font-weight: bold;
}

.sort-group {
  display: flex;
  align-items: center;
  margin-left: 30px;
  font-size: 14px;
}

.sort-group:hover {
  cursor: pointer;
}

.sort-group:hover span {
  color: #409eff;
}

.sort-group i {
  font-weight: bold;
}

.sort-active {
  color: #409eff;
}

.upload-demo {
  width: 260px;
  min-height: 220px;
  border-radius: 4px;
  border: 1px dashed #999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

.el-icon-upload {
  font-size: 160px;
  color: #999;
}

.el-upload__text {
  color: #409eff;
  text-align: center;
  font-size: 14px;
}

.files-list {
  display: flex;
  font-size: 14px;
  padding: 6px;
  align-items: center;
  padding-left: 26%;
}
 
</style>

<style scoped>
.popup {
  position: fixed;
  top: 0px;
  left:850px;
  width: 20%;
  height: 20%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index:9999
}
 
.popup-content {
  background: #fff;
  padding: 10px;
  border-radius: 5px;
}
 
.close-button {
  margin-top: -80px;
  background: darkgray;
}
</style>


<style>
.cloudDiagnosis .el-loading-mask {
  background-color: rgba(255, 255, 255, .1) !important;
}

.cloudDiagnosis .cloudDiagnosisDialog .demo-ruleForm {
  display: flex;
  flex-wrap: wrap;
}

.cloudDiagnosis .cloudDiagnosisDialog .demo-ruleForm .el-form-item {
  width: 50%;
}
</style>
